From a85da715cfffbc294589ad4edc4c7564ae6fcc25 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 16 Nov 2015 13:11:59 +0100 Subject: [PATCH] x86/IO-APIC: adjust setting of destinations setup_IO_APIC_irqs() runs before APs get brought up, so using desc->arch.cpu_mask as best risks it being either empty or having bits for CPUs other than the BP set. Just use the APIC ID of the only online CPU directly. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 511cd4014c..6a71cef7f8 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1039,7 +1039,7 @@ static void __init setup_IO_APIC_irqs(void) disable_8259A_irq(irq_to_desc(irq)); desc = irq_to_desc(irq); - SET_DEST(entry, logical, cpu_mask_to_apicid(desc->arch.cpu_mask)); + SET_DEST(entry, logical, get_apic_id()); spin_lock_irqsave(&ioapic_lock, flags); __ioapic_write_entry(apic, pin, 0, entry); set_native_irq_info(irq, TARGET_CPUS); -- 2.30.2